package minio.entity;


import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("file_record")
public class FileRecord {

    public FileRecord(String md5, String uploadId, String fileName, Long size, Integer totalChunks) {
        this.md5 = md5;
        this.uploadId = uploadId;
        this.fileName = fileName;
        this.totalChunks = totalChunks;
        this.size = size;
        this.isUploaded = 0;
        this.completedParts = 0;
        this.createdAt = new Date();

    }

    @TableId(type = IdType.AUTO)
    private Integer id;

    private Date createdAt;

    private Date updatedAt;

    private Date deletedAt;

    private String fileName;

    private String md5;

    private String fileUrl;

    private String uploadId;

    private Integer isUploaded;

    private Integer totalChunks;

    private Long size;

    private Integer completedParts;


}
